package com.spark.rectify

import android.app.Activity
import android.content.Intent
import android.os.Bundle
import com.spark.common.BaseActivity

class RectHistoryDetailActivity : BaseActivity() {
    private var rectHistoryDetailFragment: RectHistoryDetailFragment? = null

    companion object {
        fun actionStart(host: Activity, data: String) {
            val intent = Intent(host, RectHistoryDetailFragment::class.java)
            intent.putExtra("data", data)
            host.startActivity(intent)
        }
    }

    override fun contentResId(): Int {
        return R.layout.act_container
    }

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        intent?.apply {
            getStringExtra("data")?.apply {
                rectHistoryDetailFragment = RectHistoryDetailFragment.newInstance()
                loadRootFragment(R.id.fl_content, rectHistoryDetailFragment!!)
            }
        }
    }
}